﻿@{
    ViewBag.Title = "ChangePassword";
    Layout = "~/Views/Shared/_LayoutChild.cshtml";
}
@model Agro.Models.T_User
@section head {
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            //更新皮肤
        });
        function Save(t) {
            var password1 = $("#Password1").val();
            var password2 = $("#Password2").val();
            if (password1 == null || password1 == "") {
                alert("密码不能为空!");
                return;
            }
            if (password1 != password2) {
                alert("两次密码不一致!");
                return;
            }

            $.funSaveForm("/SystemManage/User/SetPassword", "formDetail", function (d) {
                $("#User_ID").val(d);
                parent.asyncbox.tips('保存成功!', 'success');
               
                parent.$.close(t.id);
            });
        }
    </script>
}
<!--主窗体，页面都需要的div-->
<div class="ui-layout-center" style="overflow: hidden;">
    @using (Html.BeginForm("", "", FormMethod.Post, new Dictionary<string, object> { { "id", "formDetail" } }))
    {
        @Html.HiddenFor(model => model.User_ID) 
        @Html.HiddenFor(model => model.User_OrganizationID) 
         <div class='b-col'>
            <div class="col-name">
                用户编号：</div>
            <div class="col-input">@Html.TextBoxFor(model => model.User_Code, new { @readonly = "readonly" })</div>
        </div>
        <div class='b-col'>
            <div class="col-name">
                用户名称：</div>
            <div class="col-input">@Html.TextBoxFor(model => model.User_Name, new { @readonly = "readonly" })</div>
        </div>
        <div class='b-col'>
            <div class="col-name" style="color: Blue">
                新密码：</div>
            <div class="col-input">@Html.Password("Password1")</div>
        </div>
        <div class='b-col'>
            <div class="col-name" style="color: Blue">
                确认密码：</div>
            <div class="col-input">@Html.Password("Password2")</div>
        </div>
    }
</div>
